#ifndef ACTSODIRTY
#define ACTSODIRTY

class MenuShard
{
public:
	MenuShard() {}
	
	MenuShard(float x, float y, float z, float height, float width, float speed, float rotation, int texture): 
		itsX(x),
		itsY(y),
		itsZ(z),
		itsHeight(height),
		itsWidth(width),
		itsRotation(rotation),
		itsTexture(texture),
		itsSpeed(speed) {}
		
	~MenuShard() {}

	// Accessor functions: -
	float	GetX() const { return itsX; }
	float	GetY() const { return itsY; }
	float	GetZ() const { return itsZ; }
	float	GetHeight() const { return itsHeight; }
	float	GetWidth() const { return itsWidth; }
	float	GetSpeed() const { return itsSpeed; }
	float	GetRotation() const { return itsRotation; }
	int		GetTexture() const { return itsTexture; }
	void	SetX(float x) { itsX = x; }
	void	SetY(float y) { itsY = y; }
	void	SetZ(float z) { itsZ = z; }
	void	SetHeight(float height) { itsHeight = height; }
	void	SetWidth(float width) { itsWidth = width; }
	void	SetSpeed(float speed) { itsSpeed = speed; }
	void	SetRotation(float rotation) { itsRotation = rotation; }
	void	SetTexture(int texture) { itsTexture = texture; }
	// Methods: -
	void Draw();
	void Rot() { itsRotation++; }

private:
	float	itsX;
	float	itsY;
	float	itsZ;
	float	itsHeight;
	float	itsWidth;
	float	itsSpeed;
	float	itsRotation;
	unsigned int		itsTexture;
};

void MenuShard::Draw()
{
	//glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	glLoadIdentity();

	glEnable(GL_TEXTURE_2D);


	if(itsTexture == 0) glBindTexture(GL_TEXTURE_2D, g_Texture[0]);
	if(itsTexture == 1) glBindTexture(GL_TEXTURE_2D, g_Texture[1]);
	if(itsTexture == 2) glBindTexture(GL_TEXTURE_2D, g_Texture[2]);
	if(itsTexture == 3) glBindTexture(GL_TEXTURE_2D, g_Texture[3]);
	

	glTranslatef(itsX,itsY,itsZ);

	glRotatef((float)(itsRotation * itsSpeed), 0.0f, 1.0f, 0.0f);
	
	glColor4f(1.0f,1.0f,1.0f,0.0f);
	glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_COLOR); 
	glEnable(GL_BLEND);
	
	glBegin(GL_QUADS);
	
		// Top right.
		//glColor3f(0.0f,0.0f,1.0f);
		glTexCoord2f(1.0f,0.0f); glVertex3f(0.0f + (itsWidth/2), 0.0f - (itsHeight/2), 0.0f);	
		// Bottom right.
		//glColor3f(1.0f,1.0f,0.0f);
		glTexCoord2f(1.0f,1.0f); glVertex3f(0.0f + (itsWidth/2), 0.0f + (itsHeight/2), 0.0f);
		// Bottom left.
		//glColor3f(0.5f,1.0f,0.0f);
		glTexCoord2f(0.0f,1.0f); glVertex3f(0.0f - (itsWidth/2), 0.0f + (itsHeight/2), 0.0f);
		// Top left.
		//glColor3f(1.0f,0.0f,0.0f);
		glTexCoord2f(0.0f,0.0f); glVertex3f(0.0f - (itsWidth/2), 0.0f - (itsHeight/2), 0.0f);



	glEnd();
	
	//SwapBuffers(hDC);	// Display what we've drawn!
}
#endif